package com.ionehe.group.common.uaa.ex.application.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ionehe.group.common.uaa.ex.dto.INode;
import com.ionehe.group.common.uaa.ex.dto.Long2String;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * Copyright (c) 2020 ionehe.com
 * Date: 2020/11/24
 * Time: 下午05:25
 *
 * @author 2020年 <a href="mailto:a@ionehe.com">秀</a>
 */
@Data
public class FunctionVO {
    /**
     * 主键
     */
    @ApiModelProperty(value = "id", example = "1", dataType = "Long", required = true)
    @JsonSerialize(using = Long2String.class)
    private Long id;

    /**
     * 父id
     */
    @ApiModelProperty(value = "父id", example = "1", dataType = "Long", required = true)
    private Long pid;

    /**
     * 功能名称
     */
    @ApiModelProperty(value = "功能名称", example = "权限管理", dataType = "String", required = true)
    private String name;

    /**
     * 后端为接口，前端为跳转url
     */
    @ApiModelProperty(value = "后端为接口，前端为跳转url", example = "/function/list", dataType = "String", required = true)
    private String url;

    /**
     * 类型（目录1，页面2，按钮3）
     */
    @ApiModelProperty(value = "类型", example = "1", dataType = "Integer", notes = "目录1，页面2，按钮3", required = true)
    private Integer type;

    /**
     * 排序（正序）
     */
    @ApiModelProperty(value = "排序值", example = "1", dataType = "Integer", required = true)
    private Integer sort;

    /**
     * 状态（1上架，2下架）
     */
    @ApiModelProperty(value = "状态", example = "0", dataType = "Long", notes = "1上架 0下架", required = true)
    private Integer status;

    /**
     * 等级
     */
    @ApiModelProperty(value = "等级", example = "1", dataType = "Integer", notes = "", required = true)
    private Integer level;

    /**
     * 子功能列表
     */
    @ApiModelProperty(value = "子功能列表", dataType = "List", required = true)
    private List<INode> children;
}